#include <stdio.h>

int sum;
int di_gui(int x)
{
	if(x == 1) return 1;
	else 
	{
		sum = x * di_gui(x - 1);
	}
	return sum;
}

int main()
{
	int n;
	scanf("%d", &n );
	printf("%d\n",di_gui(n));
	return 0;
 } 
